/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * InterfaceDadosCliente.java
 *
 * Created on 06/07/2010, 20:54:05
 */

package imobiliaria.gui;

import imobiliaria.entidades.Cliente;

/**
 *
 * @author bruno
 */
public class InterfaceDadosCliente extends javax.swing.JFrame {

    //Atributos
    Cliente cliente;
    /** Creates new form InterfaceDadosCliente */
    public InterfaceDadosCliente(Cliente cliente) {
        this.cliente = cliente;
        initComponents();
        setLocationRelativeTo(null);
        setTitle("Dados De Cliente");
        JL_NomeDoCliente.setText(cliente.getNome());
        JL_CpfDoCliente.setText(cliente.getCpf());
        JL_EnderecoDoCliente.setText(cliente.getEndereco());
        JL_NascimentoDoCliente.setText(cliente.getDataNascimento());
        JL_PreferenciaDoCliente.setText(cliente.getPreferencia().toString());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        JL_Nome = new javax.swing.JLabel();
        JL_Cpf = new javax.swing.JLabel();
        JL_Endereco = new javax.swing.JLabel();
        JL_Nascimento = new javax.swing.JLabel();
        JL_Preferencia = new javax.swing.JLabel();
        JL_NomeDoCliente = new javax.swing.JLabel();
        JL_CpfDoCliente = new javax.swing.JLabel();
        JL_EnderecoDoCliente = new javax.swing.JLabel();
        JL_NascimentoDoCliente = new javax.swing.JLabel();
        JL_PreferenciaDoCliente = new javax.swing.JLabel();
        JB_Voltar = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(800, 600));

        jLabel1.setText("DADOS DO CLIENTE");

        JL_Nome.setText("Nome:");

        JL_Cpf.setText("CPF:");

        JL_Endereco.setText("Endereço:");

        JL_Nascimento.setText("Nascimento:");

        JL_Preferencia.setText("Preferencia:");

        JL_NomeDoCliente.setText("Nome Do Cliente");

        JL_CpfDoCliente.setText("Numero Cpf");

        JL_EnderecoDoCliente.setText("Endereco do Cliente");

        JL_NascimentoDoCliente.setText("Nascimento Do Cliente");

        JL_PreferenciaDoCliente.setText("Preferencia Do Cliente");

        JB_Voltar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imobiliaria/images/okIcon.png"))); // NOI18N
        JB_Voltar.setText("OK");
        JB_Voltar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_VoltarActionPerformed(evt);
            }
        });

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imobiliaria/images/iMobLogo.png"))); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(290, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(355, 355, 355))
            .addGroup(layout.createSequentialGroup()
                .addGap(101, 101, 101)
                .addComponent(JB_Voltar, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 199, Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addGap(78, 78, 78))
            .addGroup(layout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JL_Nome)
                    .addComponent(JL_Cpf)
                    .addComponent(JL_Endereco)
                    .addComponent(JL_Nascimento)
                    .addComponent(JL_Preferencia))
                .addGap(44, 44, 44)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(JL_CpfDoCliente)
                    .addComponent(JL_NascimentoDoCliente)
                    .addComponent(JL_EnderecoDoCliente)
                    .addComponent(JL_PreferenciaDoCliente)
                    .addComponent(JL_NomeDoCliente))
                .addContainerGap(451, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(jLabel1)
                .addGap(30, 30, 30)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_Nome)
                    .addComponent(JL_NomeDoCliente))
                .addGap(38, 38, 38)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_Cpf)
                    .addComponent(JL_CpfDoCliente))
                .addGap(38, 38, 38)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_Endereco)
                    .addComponent(JL_EnderecoDoCliente))
                .addGap(42, 42, 42)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_Nascimento)
                    .addComponent(JL_NascimentoDoCliente))
                .addGap(41, 41, 41)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(JL_Preferencia)
                    .addComponent(JL_PreferenciaDoCliente))
                .addGap(135, 135, 135)
                .addComponent(JB_Voltar, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(57, 57, 57))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(343, Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addGap(25, 25, 25))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void JB_VoltarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_VoltarActionPerformed
        new InterfaceCliente(cliente).setVisible(true);
        dispose();
    }//GEN-LAST:event_JB_VoltarActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new InterfaceDadosCliente(null).setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton JB_Voltar;
    private javax.swing.JLabel JL_Cpf;
    private javax.swing.JLabel JL_CpfDoCliente;
    private javax.swing.JLabel JL_Endereco;
    private javax.swing.JLabel JL_EnderecoDoCliente;
    private javax.swing.JLabel JL_Nascimento;
    private javax.swing.JLabel JL_NascimentoDoCliente;
    private javax.swing.JLabel JL_Nome;
    private javax.swing.JLabel JL_NomeDoCliente;
    private javax.swing.JLabel JL_Preferencia;
    private javax.swing.JLabel JL_PreferenciaDoCliente;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables

}
